package com.joshua.spring.service.impl;

import com.joshua.spring.entity.dto.UserInfoDTO;
import com.joshua.spring.entity.dto.UserQueryDTO;
import com.joshua.spring.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.stereotype.Service;

/**
 * projectName dragon-cloud
 * package com.joshua.spring.service.impl
 * classname  UserServiceImpl
 * <p>
 * description
 * </p>
 *
 * @author <a href="mailto:joshualwork@163.com">joshua_liu</a>
 * @date 2020/9/18 10:23
 */
@Slf4j
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private PasswordEncoder passwordEncoder;

    @Override
    public UserInfoDTO queryUser(UserQueryDTO build) {
        UserInfoDTO userInfo = new UserInfoDTO();
        userInfo.setUsername("zhangsan");
        userInfo.setPassword(passwordEncoder.encode("1234"));
        return userInfo;
    }
}
